Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
fib(N) → sel(N, fib1(s(0), s(0)))
fib1(X, Y) → cons(X, n__fib1(Y, add(X, Y)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
sel(0, cons(X, XS)) → X
sel(s(N), cons(X, XS)) → sel(N, activate(XS))
fib1(X1, X2) → n__fib1(X1, X2)
activate(n__fib1(X1, X2)) → fib1(X1, X2)
activate(X) → X
Q is empty.
↳ QTRS
↳ DirectTerminationProof
Q restricted rewrite system:
The TRS R consists of the following rules:
fib(N) → sel(N, fib1(s(0), s(0)))
fib1(X, Y) → cons(X, n__fib1(Y, add(X, Y)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
sel(0, cons(X, XS)) → X
sel(s(N), cons(X, XS)) → sel(N, activate(XS))
fib1(X1, X2) → n__fib1(X1, X2)
activate(n__fib1(X1, X2)) → fib1(X1, X2)
activate(X) → X
Q is empty.
We use [23] with the following order to prove termination.
Lexicographic path order with status [19].
Quasi-Precedence:
fib1 > sel2 > activate1 > fib12 > add2 > s1 > [cons2, nfib12]
fib1 > 0 > [cons2, nfib12]
Status: sel2: [1,2]
add2: [1,2]
fib1: [1]
s1: [1]
0: multiset
cons2: [1,2]
fib12: [1,2]
nfib12: [2,1]
activate1: [1]